package com.manager.user.controller;


import com.manager.common.result.Result;
import com.manager.model.model.User;
import com.manager.user.service.UserUserService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;

@RestController
@RequestMapping("/user")
@Api(description = "用户管理")
@CrossOrigin(origins = "*")
public class UserController {

    @Resource
    private UserUserService userService;

    @ApiOperation(value = "通过id获取用户信息")
    @GetMapping("/{id}")
    public Result<User> getUserById(@PathVariable String id){
        return userService.getUserById(id);
    }

    @ApiOperation(value="导出跟进内容")
    @GetMapping("/exportUpdateContent")
    public void exportUpdateContent(HttpServletResponse response){
        userService.exportUpdateContent(response);
    }
}
